<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>课表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../layui/css/layui.css" media="all">
    <script src="../../jquery/jquery.min.js"></script>
    <script src="../../jquery/template-web.js" charset="utf-8"></script>
    <script src="../../layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript">

        layui.config({
            base : "/static/js/"
        }).use(['form', 'laydate','common','table'], function() {
            var form = layui.form,
                    layer = layui.layer,
                    laydate = layui.laydate,
                    common = layui.common,
                    table = layui.table,
                    $ = layui.$;

            laydate.render({
                type: 'year',
                elem: '#planYear'
            });

            //查询
            layui.use('table', function () {
                var table = layui.table;

            });
            /**导出*/
            $(".excel_btn").click(function(){
                var planYear = $("#yearInput").val();
                if(planYear!=null ) {
                    $.post("/TotalSelectController/excel?planYear="+planYear, null, function (data) {

                        if (data.code == 200) {
                            window.location.href = "/upload/excel/TotalSelect.xls";
                            layer.msg('下载全部数据成功！', {
                                time: 500,
                            });

                        } else {
                            layer.msg('下载失败,请联系管理员', {
                                time: 5000,
                            });
                        }
                    });
                }

            });
        });
        $(document).ready(function(){
            //  监听select下拉框

            layui.use('form', function(){
                var form = layui.form;
                //监听提交
                form.on('select(test)', function(data){
                    window.location.href="/courseTable/tocourseTable?weekNum="+data.value;
                });
            });
        });
    </script>
    <script type="text/tpl" id="types">
    </script>
</head>

<body>
<div id="button-type">

    <fieldset class="layui-elem-field layui-field-title" >

        <legend style="text-align:center;" ><h5>课表</h5></legend>

        <a href="/courseTable/tocourseTableAdd"><button class="layui-btn layui-btn-radius">课表课程分配</button></a>
    </fieldset>
</div>
<div id="showStandard">
    <fieldset class="layui-elem-field layui-field-title" style="width: 1100px; margin:auto">
        <legend style="text-align:center" ><h2>第<#if weekNum == null>1</#if>${weekNum}周课表</h2></legend>
    </fieldset>
    <input type="hidden" id="yearInput" value="<%=te%>">
    <form class="layui-form layui-form-pane"  method="post" lay-filter="SearchFilter"  >
        <div class="layui-form-item">
            <div class="layui-inline">
                <a class="layui-btn layui-btn-normal excel_btn"  style="background-color:#5FB878"> <i class="layui-icon  "></i>导出</a>
            </div>
            <div class="layui-inline" >
                <label class="layui-form-label">时间</label>
                <div class="layui-input-inline" >
                    <select name="weekNum" id="wbwbbw" lay-filter="test">
                        <option value="">请选择周次</option>
                        <#list weekNameList as dictionary>
                            <option value="${dictionary.dictionaryKey}">${dictionary.dictionaryName}</option>
                        </#list>
                    </select>
                </div>
            </div>
        </div>
    </form>

    <table class="layui-table" id="TableId" style='font-size:20px;text-align: center;width:1100px; margin: auto;margin-top: 20px'>
        <colgroup>
            <col width="100">
            <col width="130">
            <col width="130">
            <col width="130">
            <col width="130">
            <col width="130">
            <col width="130">
            <col width="130">
        </colgroup>
        <thead>
        <tr style='font-size:20px;text-align: center'>
            <th style='padding-top:26px;text-align: center' colspan="8" >本课表为${thisYear}-${nextYear}年实验室课表</th>
        </tr>
        <tr style='font-size:20px;text-align: center'>
            <th style='padding-top:26px;text-align: center; color: black' >    </th>
            <th style='padding-top:26px;text-align: center; color: black' >星期一</th>
            <th style='padding-top:26px;text-align: center; color: black' >星期二</th>
            <th style='padding-top:26px;text-align: center; color: black' >星期三</th>
            <th style='padding-top:26px;text-align: center; color: black' >星期四</th>
            <th style='padding-top:26px;text-align: center; color: black' >星期五</th>
            <th style='padding-top:26px;text-align: center; color: black' >星期六</th>
            <th style='padding-top:26px;text-align: center; color: black' >星期日</th>
        </tr>
        </thead>
        <tbody>

        <tr style="text-align: center">
            <td style='padding-top:26px;'>1-2</td>

            <td style='padding-top:26px;'>

              <#list courseTableList as ct>

                        <#if ct.monday==1 && ct.oneToTwo==1>
                            ${ct.courseName}
                        </#if>
              </#list>
            </td>
            <td style='padding-top:26px;'>
                 <#list courseTableList as ct>

                     <#if ct.tuesday==1 && ct.oneToTwo==1>
                         ${ct.courseName}
                   
                     </#if>
                 </#list>
         
            </td>
            <td style='padding-top:26px;'>
                 <#list courseTableList as ct>

                     <#if ct.wednesday==1 && ct.oneToTwo==1>
                         ${ct.courseName}
                     </#if>
                 </#list>

            </td>
            <td style='padding-top:26px;'>
                 <#list courseTableList as ct>

                     <#if ct.thursday==1 && ct.oneToTwo==1>
                         ${ct.courseName}
                     </#if>
                 </#list>
            </td>
            <td style='padding-top:26px;'>
               <#list courseTableList as ct>

                   <#if ct.friday==1 && ct.oneToTwo==1>
                       ${ct.courseName}
                      
                              
                   </#if>
               </#list>
             
            </td>
            <td style='padding-top:26px;'>
                <#list courseTableList as ct>

                     <#if ct.saturday==1 && ct.oneToTwo==1>
                         ${ct.courseName}
                     </#if>
                 </#list>
            <#if noCourse==0>
                  
            </#if>
            </td>
            <td style='padding-top:26px;'>
                <#list courseTableList as ct>

                    <#if ct.sunday==1 && ct.oneToTwo==1>
                        ${ct.courseName}

                    </#if>
                </#list>

            </td>
        </tr>
        <tr style="text-align: center">
            <td style='padding-top:26px;'>3-4
            </td>

            <td style='padding-top:26px;'>
                <#list courseTableList as ct>

                    <#if ct.monday==1 && ct.threetoFour==1>
                        ${ct.courseName}
                       
                              
                    </#if>
                </#list>

            </td>
            <td style='padding-top:26px;'>
               <#list courseTableList as ct>

                   <#if ct.tuesday==1 && ct.threetoFour==1>
                       ${ct.courseName}
                      
                              
                   </#if>
               </#list>
            </td>
            <td style='padding-top:26px;'>
                <#list courseTableList as ct>

                    <#if ct.wednesday==1 && ct.threetoFour==1>
                        ${ct.courseName}
                       
                              
                    </#if>
                </#list>

            </td>
            <td style='padding-top:26px;'>
                <#list courseTableList as ct>

                    <#if ct.thursday==1 && ct.threetoFour==1>
                        ${ct.courseName}
                       
                              
                    </#if>
                </#list>

            </td>
            <td style='padding-top:26px;'>
                <#list courseTableList as ct>

                    <#if ct.friday==1 && ct.threetoFour==1>
                        ${ct.courseName}
                       
                              
                    </#if>
                </#list>

            </td>
            <td style='padding-top:26px;'>
               <#list courseTableList as ct>

                   <#if ct.saturday==1 && ct.threetoFour==1>
                       ${ct.courseName}
                      
                              
                   </#if>
               </#list>

            </td>
            <td style='padding-top:26px;'>
               <#list courseTableList as ct>

                   <#if ct.sunday==1 && ct.threetoFour==1>
                       ${ct.courseName}
                      
                              
                   </#if>
               </#list>

            </td>
        </tr>
        <tr style="text-align: center">
            <td style='padding-top:26px;'>5-6
            </td>

            <td style='padding-top:26px;'>
               <#list courseTableList as ct>

                   <#if ct.monday==1 && ct.fivetoSix==1>
                       ${ct.courseName}
                      
                              
                   </#if>
               </#list>

            </td>
            <td style='padding-top:26px;'>
               <#list courseTableList as ct>

                   <#if ct.tuesday==1 && ct.fivetoSix==1>
                       ${ct.courseName}
                      
                              
                   </#if>
               </#list>

            </td>
            <td style='padding-top:26px;'>
                <#list courseTableList as ct>

                    <#if ct.wednesday==1 && ct.fivetoSix==1>
                        ${ct.courseName}
                       
                              
                    </#if>
                </#list>

            </td>
            <td style='padding-top:26px;'>
                <#list courseTableList as ct>

                    <#if ct.thursday==1 && ct.fivetoSix==1>
                        ${ct.courseName}
                       
                              
                    </#if>
                </#list>

            </td>
            <td style='padding-top:26px;'>
               <#list courseTableList as ct>

                   <#if ct.friday==1 && ct.fivetoSix==1>
                       ${ct.courseName}
                      
                              
                   </#if>
               </#list>

            </td>
            <td style='padding-top:26px;'>
               <#list courseTableList as ct>

                   <#if ct.saturday==1 && ct.fivetoSix==1>
                       ${ct.courseName}
                      
                              
                   </#if>
               </#list>

            </td>
            <td style='padding-top:26px;'>
               <#list courseTableList as ct>

                   <#if ct.sunday==1 && ct.fivetoSix==1>
                       ${ct.courseName}
                      
                              
                   </#if>
               </#list>

            </td>
        </tr>
        <tr style="text-align: center">
            <td style='padding-top:26px;'>7-8
            </td>

            <td style='padding-top:26px;'>
               <#list courseTableList as ct>

                   <#if ct.monday==1 && ct.senventoEight==1>
                       ${ct.courseName}
                      
                              
                   </#if>
               </#list>

            </td>
            <td style='padding-top:26px;'>
                <#list courseTableList as ct>

                    <#if ct.tuesday==1 && ct.senventoEight==1>
                        ${ct.courseName}
                       
                              
                    </#if>
                </#list>

            </td>
            <td style='padding-top:26px;'>
                <#list courseTableList as ct>

                    <#if ct.wednesday==1 && ct.senventoEight==1>
                        ${ct.courseName}
                       
                              
                    </#if>
                </#list>

            </td>
            <td style='padding-top:26px;'>
                <#list courseTableList as ct>

                    <#if ct.thursday==1 && ct.senventoEight==1>
                        ${ct.courseName}
                       
                              
                    </#if>
                </#list>

            </td>
            <td style='padding-top:26px;'>
                <#list courseTableList as ct>

                    <#if ct.friday==1 && ct.senventoEight==1>
                        ${ct.courseName}
                       
                              
                    </#if>
                </#list>

            </td>
            <td style='padding-top:26px;'>
               <#list courseTableList as ct>

                   <#if ct.saturday==1 && ct.senventoEight==1>
                       ${ct.courseName}
                      
                              
                   </#if>
               </#list>

            </td>
            <td style='padding-top:26px;'>
                <#list courseTableList as ct>

                    <#if ct.sunday==1 && ct.senventoEight==1>
                        ${ct.courseName}
                       
                              
                    </#if>
                </#list>

            </td>
        </tr>
        <tr style="text-align: center">
            <td style='padding-top:26px;'>9-10
            </td>

            <td style='padding-top:26px;'>
                <#list courseTableList as ct>

                    <#if ct.monday==1 && ct.ninetoTen==1>
                        ${ct.courseName}
                       
                              
                    </#if>
                </#list>

            </td>
            <td style='padding-top:26px;'>
               <#list courseTableList as ct>

                   <#if ct.tuesday==1 && ct.ninetoTen==1>
                       ${ct.courseName}
                      
                              
                   </#if>
               </#list>

            </td>
            <td style='padding-top:26px;'>
               <#list courseTableList as ct>

                   <#if ct.wednesday==1 && ct.ninetoTen==1>
                       ${ct.courseName}
                      
                              
                   </#if>
               </#list>

            </td>
            <td style='padding-top:26px;'>
                <#list courseTableList as ct>

                    <#if ct.thursday==1 && ct.ninetoTen==1>
                        ${ct.courseName}
                       
                              
                    </#if>
                </#list>

            </td>
            <td style='padding-top:26px;'>
                <#list courseTableList as ct>

                    <#if ct.friday==1 && ct.ninetoTen==1>
                        ${ct.courseName}
                       
                              
                    </#if>
                </#list>

            </td>
            <td style='padding-top:26px;'>
               <#list courseTableList as ct>

                   <#if ct.saturday==1 && ct.ninetoTen==1>
                       ${ct.courseName}
                      
                              
                   </#if>
               </#list>

            </td>
            <td style='padding-top:26px;'>
               <#list courseTableList as ct>

                   <#if ct.sunday==1 && ct.ninetoTen==1>
                       ${ct.courseName}
                      
                              
                   </#if>
               </#list>

            </td>
        </tr>
        <tr style="text-align: center">
            <td style='padding-top:26px;'>11-12
            </td>

            <td style='padding-top:26px;'>
                <#list courseTableList as ct>

                    <#if ct.monday==1 && ct.eleventoTwelve==1>
                        ${ct.courseName}
                       
                              
                    </#if>
                </#list>

            </td>
            <td style='padding-top:26px;'>
                <#list courseTableList as ct>

                    <#if ct.tuesday==1 && ct.eleventoTwelve==1>
                        ${ct.courseName}
                       
                              
                    </#if>
                </#list>

            </td>
            <td style='padding-top:26px;'>
               <#list courseTableList as ct>

                   <#if ct.wednesday==1 && ct.eleventoTwelve==1>
                       ${ct.courseName}
                      
                              
                   </#if>
               </#list>

            </td>
            <td style='padding-top:26px;'>
              <#list courseTableList as ct>

                  <#if ct.thursday==1 && ct.eleventoTwelve==1>
                      ${ct.courseName}
                     
                              
                  </#if>
              </#list>

            </td>
            <td style='padding-top:26px;'>
               <#list courseTableList as ct>

                   <#if ct.friday==1 && ct.eleventoTwelve==1>
                       ${ct.courseName}
                      
                              
                   </#if>
               </#list>

            </td>
            <td style='padding-top:26px;'>
              <#list courseTableList as ct>

                  <#if ct.saturday==1 && ct.eleventoTwelve==1>
                      ${ct.courseName}
                     
                              
                  </#if>
              </#list>

            </td>
            <td style='padding-top:26px;'>
              <#list courseTableList as ct>

                  <#if ct.sunday==1 && ct.eleventoTwelve==1>
                      ${ct.courseName}
                     
                              
                  </#if>
              </#list>

            </td>
        </tr>
        </tbody>
    </table>
</div>
<div style="margin-bottom: 200px">

</div>
</body>
</html>
